package de.metalcon.gwt.client.pages;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;

import de.metalcon.gwt.client.Metalcon;
import de.metalcon.gwt.client.mainDesign.Box;
import de.metalcon.gwt.client.mainDesign.MainContent;

public class HomePage extends APage {
	public HomePage() {
		Box box = new Box();
		add(box);
		String s ="<h1>This is a demonstration of a newsstream Application</h1>";
		s = s+ "Find more info on <a href='http://www.rene-pickhardt.de/amazed-by-neo4j-gwt-and-my-apache-tomcat-webserver/' target=_blank>Renes Blog article</a><br>";
		s = s+ "The graph is taken from the bavarian wikipedia. It contains of <ul>";
		s = s+ "<li>of 8'760 entities</li>";
		s = s+ "<li>~95'000 content items</li>";
		s = s+ "<li>==> together more than 100'000 nodes</li>";
		s = s+ "<li>almost 20'000 different relationship types</li>";
		s = s+ "<li>about 100'000 edges connecting the 8'760 entities</li>";
		s = s+ "<li>mainting the index was possible with 177 writes / second on a slow notebook computer</li>";
		s = s+ "</ul>";
		s = s+ "The graph is stored in neo4j and the indexing techniques for the news stream follow <a href='http://www.rene-pickhardt.de/data-structure-for-social-news-streams-on-graph-data-bases/' target=_blank>this article</a>";
		s = s+ "<h2><a href='http://gwt.metalcon.de/GWT-Modelling/#Wiki_375'>Launch the application</a> (the numbers in the application are timestamps!)</h2>";
		s = s+ "if you want to blog about this demo pleas link to <a href='http://www.rene-pickhardt.de/neo4j-news-stream-demo-on-wikipedia-graph-running' target=_blank>this article</a>. since the adress under which this demo runs will most likly change in future";
		HTML html = new HTML(s);
		box.add(html);
	}

	@Override
	public String getHistoryToken() {
		return getHistoryTokenPrefix();
	}
	
	public static String generateHistoryToken() {
		return getHistoryTokenPrefix();
	}
	
	public static String getHistoryTokenPrefix() {
		return "Home";
	}
}
